<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="css/division.css">
    <link rel="stylesheet" href="../dist/css/workflow-theme.css">
</head>
<body>
    <section>
    <table>
        <tr>
            <td>
                <span data-toggle="tooltip" title="111" data-placement="right" data-name="tip">?</span>
                <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#Modal">添加自评</button>
            </td>
        </tr>
    </table>
<!-- 按钮触发模态框 -->
<!-- 模态框（Modal） -->
<div class="modal fade" id="Modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="display:none;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <input type="text" name="content"/>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" data-name="submit">提交更改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
    </section>
    <script src="../bower_components/jquery/dist/jquery.js"></script>
    <script src="../dist/js/workflow-theme.js"></script>
</body>
</html>
<script>

    $("[data-toggle='tooltip']").tooltip()
    $('[data-name="submit"]').on("click",function(e){
        $('#Modal').modal("hide");
        $("[data-name='tip']").tooltip().attr("data-original-title",$('[name="content"]').val())
        console.log($('[name="content"]').val(),$("[data-name='tip']").tooltip().attr("title"));
    })
</script>